<?php 
// Conecta com o banco de dados
include '../includes/conectionMySql.inc';

$id = $_GET['id'];

$query = 'SELECT chamado.solicitante, sistema.nome, chamado.email, interacao.assunto, interacao.descricao, DATE_FORMAT(interacao.dataInteracao,\'%d/%m/%Y %h:%i\'), interacao.visualizado FROM chamados chamado inner join chamados_interacoes interacao on chamado.id = interacao.idChamado inner join chamados_sistemas sistema on chamado.sistema = sistema.id WHERE interacao.id = '.$id;

$result = mysql_query($query);
$row = mysql_fetch_array($result);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Informações</title>
</head>

<body>
	<h2>Solicitação de chamado</h2>
	<form>
    	<table border="0">
        	<tr>
            	<td>Solicitante:</td>
                <td><?php echo $row[0]?></td>
                <td>Data Abertura:</td>
                <td><?php echo $row[5]?></td>
            </tr>
            <tr>
            	<td>E-Mail</td>
                <td><?php echo $row[2]?></td>
            </tr>
            <tr>
            	<td>Assunto:</td>
                <td><?php echo $row[3]?></td>
            </tr>
            <tr>
				<td>Sistema: </td>
                <td><?php echo $row[1]?></td>
            </tr>
        </table>
        <table>
            <tr>
            	<td>Descrição:</td>
            </tr>
            <tr>
	            <td><textarea name="txtDesc" readonly="readonly"><?php echo $row[4]?></textarea></td>
            </tr>
        </table>
	</form>
</body>
</html>
